<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<link rel="stylesheet" type="text/css" href="../img-font/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="../css/css.css" />
		<script src="../js/jquery.min.js"></script>
		<script src="../js/main.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="../js/Url.js"></script>
		<title></title>
	</head>
	<style type="text/css">
		.record-external {
			width: 100%;
			height: 100%;
			background: #ebebeb;
			overflow-y: scroll;
			font-size: 14px;
		}
		
		.record {
			width: 100%;
			height: 40px;
			text-align: center;
			background: #666;
			line-height: 40px;
			color: #fff;
		}
		
		nav {
			width: 100%;
			height: 30px;
			background: #fff;
			margin-top: 50px;
		}
		
		nav ul {
			display: block;
			width: 100%;
			height: 100%;
			display: flex;
			margin-top: 20px;
		}
		
		nav ul li {
			display: block;
			width: 25%;
			text-align: center;
			line-height: 30px;
		}
		
		
		.fanjian {
			height: 100%;
			display: block;
			color: #000;
			font-size: 24px;
			line-height: 30px;
			float: left;
			text-indent: 24px;
			position: absolute;
			top: 10px;
			left: 0;
		}
	</style>

	<body>
		<!--纪录列表-->
		<div class="record-external">
			<div class="topnav">
				<a href="javascript:history.go(-1)"><span class="fanjian iconfont icon-xia"></span></a>获得佣金纪录
			</div>
			<nav>
				<ul>
					<li>序号</li>
					<li>点击时间</li>
					<li>获得佣金</li>
					<li>操作</li>
				</ul>
			</nav>
		</div>
	</body>

</html>
<script type="text/javascript">
	//时间转换
	function getLocalTime(nS) {
		return new Date(parseInt(nS)).toLocaleString().substr(0, 17)

	}
//	expendTime
	$(function() {
		$.ajax({
			type: "get",
			url: baseUrl + "foot/user/getCommissionRecord",
			contentType: "application/json; charset=utf-8",
			success: function(res) {
				console.log(res)
				for(var i = 0; i < res.data.value.length; i++) {
					var acc = '';
					acc += getLocalTime(res.data.value[i].commTime);
					var str = '';
						str += '<ul>';
						str += '<li>'+(i+1)+'</li>';
						str += '<li>'+acc.substring(9, length)+'</li>';
						str += '<li>'+res.data.value[i].money+'</li>';
						str += '<li>--</li>';
						str+= '</ul>';

					$('nav').append(str)
				}
			}
		});
	})
</script>
<script>
	var Url = baseUrl+"subpage/Get-commission.html";
	$.ajax({
		url: '/wechat/getweixinjs',
		data: {
			url: Url
		},
		type: 'get',
		dataType: 'json',
		success: function(res) {
			console.log(res)
			wx.config({
				debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
				appId: res.data.appId, // 必填，公众号的唯一标识
				timestamp: res.data.timestamp, // 必填，生成签名的时间戳
				nonceStr: res.data.nonceStr, // 必填，生成签名的随机串
				signature: res.data.signature, // 必填，签名，见附录1
				jsApiList: ["hideMenuItems"] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
			});
		}
	})

	wx.ready(function() {
		hideMenu();
	});
	wx.error(function(res) {

	});

	function hideMenu() {
		wx.hideMenuItems({
			menuList: ["menuItem:share:email","menuItem:copyUrl","menuItem:share:appMessage","menuItem:share:timeline","menuItem:favorite","menuItem:openWithQQBrowser","menuItem:openWithSafari","menuItem:share:qq","menuItem:share:QZone"]
		});
	}
</script>